The character of the instruction scheduling problem
نویسنده
چکیده
Here I present some measurements that serve to characterize the nature of the problem of basic block instruction scheduling, as it is encountered in practice. Finding optimal schedules is known to be NP-hard [Hennessy and Gross, 1983]; but it is worth knowing how hard the task is in an average sense, where the average is with respect to an input space of problems (basic blocks) found in the everyday practice of compiling. The space I consider is the set of all basic blocks in all of SPEC95 benchmarks, produced by compiling on the Digital Alpha architecture [Bhandarkar, 1996]. It is also worth knowing how close a heuristic scheduler comes to the optimum, especially when one wants to design a new heuristic scheduler; I present one such evaluation for a scheduler made available by Digital and show that it is almost optimal (with respect to its own cost measure). 1 SPEC95 properties The SPEC95 benchmark suite comprises 18 programs, of which 10 are written in FORTRAN and 8 in C. The programs are listed in Table 1. The distinction between languages and compilers should be made, as it is possible that there are inherent differences between object codes produced by the native FORTRAN and C compilers with respect to basic block structure. 2 Search space size The number of permutations that can be arranged out of n instructions is n!, a very large number. It is quite clear that if no systematic way to explore this space efficiently is available, and that is in the nature of NP-hardness, then finding an optimal schedule requires one to generate a very large number of schedules and simulate each one. Now, not all permutations are legal schedules: data dependence constraints rule out some. One would like to know how many schedules are legal out of the possible n!, and whether this remaining number is perhaps sufficiently small to allow finding optima by brute force. Since the nature of the data dependence constraints is not a priori known, it is best to explore this question empirically. Hence I performed an exhaustive search of the space of legal schedules, without simulating the costs of each, with the express purpose of finding how many legal schedules there are. It turns out that the number of legal schedules still grows very fast, perhaps exponentially, in absolute terms, even though this number in relative terms (as a fraction of the maximum possible, or n!) falls rapidly. Let us observe this behavior in the plot of distribution of this fraction in Figure 1, and in the summary in Table 2. Consider the median size of the search space: for blocks of size 5, it is 6, or 1 Benchmark SPEC95 classification SPEC95 description Source lines Number of blocks Number of instructions Average size of block (instructions) FORTRAN programs 110.applu Parabolic and elliptic partial differential equations 3817 25475 129853 5.097 141.apsi FORTRAN scientific benchmark with double precision floating point arithmetic Solves for the mesoscale and synoptic variations of potential temperature, wind, velocity, and distribution of pollutants 4211 29077 159482 5.485 145.fpppp FORTRAN scientific benchmark with double precision floating point arithmetic Quantum chemistry 2122 25693 132139 5.143 104.hydro2d a vectorizable FORTRAN program with double precision floating-point arithmetic Astrophysics: hydrodynamical Navier-Stokes equations are solved to compute galactical jets 2522 26789 129568 4.837 107.mgrid Multi-grid solver in a 3D potential field 368 25555 121750 4.764 103.su2cor a vectorizable FORTRAN program with double precision floating-point arithmetic Quantum physics: Monte Carlo calculation of elementary particle masses 1614 26972 135837 5.036 102.swim a FORTRAN scientific benchmark with single precision floating point arithmetic Shallow water model with 512 512 grid 259 25109 119333 4.753 101.tomcatv a highly vectorizable double precision floating point FORTRAN benchmark A mesh-generation program 107 23856 117515 4.926 125.turb3d Simulates isotropic, homogeneous turbulence in a cube 128
منابع مشابه
Train Scheduling Problem with Consideration of Praying Constraint as an Application of Job Shop Scheduling Problem
The present paper extends the idea of job shop scheduling problem with resting constraints to the train scheduling problem with the Muslim praying considerations. For this purpose, after proposing the new mathematical model, a heuristic algorithm based on the Electromagnetism-Like algorithm (EM) which is well adjusted to scheduling problems is employed to solve the large-size practical cases. T...
متن کاملOptimality of the flexible job shop scheduling system based on Gravitational Search Algorithm
The Flexible Job Shop Scheduling Problem (FJSP) is one of the most general and difficult of all traditional scheduling problems. The Flexible Job Shop Problem (FJSP) is an extension of the classical job shop scheduling problem which allows an operation to be processed by any machine from a given set. The problem is to assign each operation to a machine and to order the operations on the machine...
متن کاملOptimality of the flexible job shop scheduling system based on Gravitational Search Algorithm
The Flexible Job Shop Scheduling Problem (FJSP) is one of the most general and difficult of all traditional scheduling problems. The Flexible Job Shop Problem (FJSP) is an extension of the classical job shop scheduling problem which allows an operation to be processed by any machine from a given set. The problem is to assign each operation to a machine and to order the operations on the machine...
متن کاملSingle-machine scheduling considering carryover sequence-dependent setup time, and earliness and tardiness penalties of production
Production scheduling is one of the very important problems that industry and production are confronted with it. Production scheduling is often planned in the industrial environments while productivity in production can improve significantly the expansion of simultaneous optimization of the scheduling plan. Production scheduling and production are two areas that have attracted much attention in...
متن کاملParticle swarm optimization for minimizing total earliness/tardiness costs of two-stage assembly flowshop scheduling problem in a batched delivery system
This paper considers a two-stage assembly flow shop scheduling problem. When all parts of each product are completed in the first stage, they are assembled into a final product on an assembly machine in the second stage. In order to reduce the delivery cost, completed products can be held until completion of some other products to be delivered in a same batch. The proposed problem addresses sch...
متن کاملA stochastic model for project selection and scheduling problem
Resource limitation in zero time may cause to some profitable projects not to be selected in project selection problem, thus simultaneous project portfolio selection and scheduling problem has received significant attention. In this study, budget, investment costs and earnings are considered to be stochastic. The objectives are maximizing net present values of selected projects and minimizing v...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 1997